﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Dictionary" targetNamespace="http://tempuri.org/Dictionary.xsd" xmlns:mstns="http://tempuri.org/Dictionary.xsd" xmlns="http://tempuri.org/Dictionary.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" GeneratorFunctionsComponentClassName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="QueriesTableAdapter" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DIProject.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CatalogTableAdapter" GeneratorDataComponentClassName="CatalogTableAdapter" Name="Catalog" UserDataComponentName="CatalogTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.CO.Catalog" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CatalogDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="OriginalID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CatalogInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@MarkUp" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="MarkUp" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, ParentId, Name,
                          (SELECT     Name
                            FROM          CO.Catalog
                            WHERE      (Id = C1.ParentId)) AS ParentName, Note, MD, MW, Id AS OriginalID, MD AS Original_MD, MarkUp, ToDelete
FROM         CO.Catalog AS C1
WHERE     (ToDelete = 0) OR
                      (ToDelete = @ToDelete)
ORDER BY Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ToDelete" ColumnName="ToDelete" DataSourceName="DIOffice.CO.Catalog" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CatalogUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@MarkUp" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="MarkUp" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="OriginalID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="OriginalID" DataSetColumn="OriginalID" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="MarkUp" DataSetColumn="MarkUp" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
              <Mapping SourceColumn="ParentName" DataSetColumn="ParentName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CountriesTableAdapter" GeneratorDataComponentClassName="CountriesTableAdapter" Name="Countries" UserDataComponentName="CountriesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Preparat.CO.Countries" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>CountriesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CountriesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, Name, ShortName, Note, MD, MW, Id AS Original_ID, MD AS Original_MD, ToDelete
FROM         CO.Countries
WHERE     (ToDelete = 0) OR
                      (ToDelete = @ToDelete)
ORDER BY Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="ToDelete" ColumnName="ToDelete" DataSourceName="Preparat.CO.Countries" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>CountriesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Original_ID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ShortName" DataSetColumn="ShortName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Original_ID" DataSetColumn="Original_ID" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="MedFormTableAdapter" GeneratorDataComponentClassName="MedFormTableAdapter" Name="MedForm" UserDataComponentName="MedFormTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Preparat.CO.MedForm" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>MedFormDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="OriginalMD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>MedFormInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, Name, ShortName, Note, MD, MW, MD AS OriginalMD, ToDelete
FROM         CO.MedForm
WHERE     (ToDelete = 0) OR
                      (ToDelete = @ToDelete)
ORDER BY Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ToDelete" ColumnName="ToDelete" DataSourceName="Preparat.CO.MedForm" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>MedFormUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="OriginalMD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ShortName" DataSetColumn="ShortName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="OriginalMD" DataSetColumn="OriginalMD" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ContragentsTableAdapter" GeneratorDataComponentClassName="ContragentsTableAdapter" Name="Contragents" UserDataComponentName="ContragentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="AptekaOne.CA.Contragents" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ContragentsDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ContragentsInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsSeller" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsSeller" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsCustomer" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsCustomer" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsSertification" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsSertification" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@EMail" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="EMail" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Phone" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="Phone" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DirectorFIO" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="DirectorFIO" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DirectorPosition" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="DirectorPosition" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@FirmType" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="FirmType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@JuridicalAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="JuridicalAddress" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@INN" Precision="0" ProviderType="VarChar" Scale="0" Size="12" SourceColumn="INN" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@KPP" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="KPP" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@OKPO" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="OKPO" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@OKONX" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="OKONX" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@SettlementAccount" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="SettlementAccount" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Bank" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Bank" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@BIK" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="BIK" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@CorrespondentAccount" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="CorrespondentAccount" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ActualAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="ActualAddress" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Fax" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="Fax" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@WebPage" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="WebPage" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ICQ" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ICQ" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, GId, Name, ShortName, IsSeller, IsCustomer, IsSertification, EMail, Phone, Note, FirmType, JuridicalAddress, INN, KPP, OKPO, OKONX, 
                      SettlementAccount, Bank, BIK, CorrespondentAccount, ActualAddress, Fax, WebPage, ICQ, MD, MW, Id AS Original_Id, MD AS Original_MD, DirectorFIO, 
                      DirectorPosition, ToDelete
FROM         CA.Contragents
ORDER BY Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ContragentsUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsSeller" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsSeller" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsCustomer" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsCustomer" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsSertification" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsSertification" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@EMail" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="EMail" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Phone" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="Phone" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@FirmType" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="FirmType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@JuridicalAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="JuridicalAddress" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@INN" Precision="0" ProviderType="VarChar" Scale="0" Size="12" SourceColumn="INN" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@KPP" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="KPP" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@OKPO" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="OKPO" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@OKONX" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="OKONX" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@SettlementAccount" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="SettlementAccount" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Bank" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Bank" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@BIK" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="BIK" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@CorrespondentAccount" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="CorrespondentAccount" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ActualAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="ActualAddress" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Fax" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="Fax" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@WebPage" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="WebPage" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ICQ" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ICQ" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Original_Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DirectorFIO" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="DirectorFIO" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DirectorPosition" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="DirectorPosition" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Todelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ShortName" DataSetColumn="ShortName" />
              <Mapping SourceColumn="IsSeller" DataSetColumn="IsSeller" />
              <Mapping SourceColumn="IsCustomer" DataSetColumn="IsCustomer" />
              <Mapping SourceColumn="IsSertification" DataSetColumn="IsSertification" />
              <Mapping SourceColumn="EMail" DataSetColumn="EMail" />
              <Mapping SourceColumn="Phone" DataSetColumn="Phone" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="FirmType" DataSetColumn="FirmType" />
              <Mapping SourceColumn="JuridicalAddress" DataSetColumn="JuridicalAddress" />
              <Mapping SourceColumn="INN" DataSetColumn="INN" />
              <Mapping SourceColumn="KPP" DataSetColumn="KPP" />
              <Mapping SourceColumn="OKPO" DataSetColumn="OKPO" />
              <Mapping SourceColumn="OKONX" DataSetColumn="OKONX" />
              <Mapping SourceColumn="SettlementAccount" DataSetColumn="SettlementAccount" />
              <Mapping SourceColumn="Bank" DataSetColumn="Bank" />
              <Mapping SourceColumn="BIK" DataSetColumn="BIK" />
              <Mapping SourceColumn="CorrespondentAccount" DataSetColumn="CorrespondentAccount" />
              <Mapping SourceColumn="ActualAddress" DataSetColumn="ActualAddress" />
              <Mapping SourceColumn="Fax" DataSetColumn="Fax" />
              <Mapping SourceColumn="WebPage" DataSetColumn="WebPage" />
              <Mapping SourceColumn="ICQ" DataSetColumn="ICQ" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Original_Id" DataSetColumn="Original_Id" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="DirectorFIO" DataSetColumn="DirectorFIO" />
              <Mapping SourceColumn="DirectorPosition" DataSetColumn="DirectorPosition" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ManufacturersTableAdapter" GeneratorDataComponentClassName="ManufacturersTableAdapter" Name="Manufacturers" UserDataComponentName="ManufacturersTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Preparat.CO.Manufacturers" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ManufacturesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ManufacturesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CountryId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CountryId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@LatName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="LatName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, CountryId, Name, ShortName, LatName, Note, MD, MW, MD AS Original_MD, ToDelete
FROM         CO.Manufacturers
WHERE     (ToDelete = 0) OR
                      (ToDelete = @ToDelete)
ORDER BY Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="ToDelete" ColumnName="ToDelete" DataSourceName="Preparat.CO.Manufacturers" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ManufacturesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CountryId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CountryId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@LatName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="LatName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="CountryId" DataSetColumn="CountryId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ShortName" DataSetColumn="ShortName" />
              <Mapping SourceColumn="LatName" DataSetColumn="LatName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GoodsTableAdapter" GeneratorDataComponentClassName="GoodsTableAdapter" Name="Goods" UserDataComponentName="GoodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>GoodsDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Original_Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>GoodsInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AssortmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssortmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ManufacturerId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ManufacturerId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CountryId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CountryId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@WholesalePack" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="WholesalePack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RetailPack" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="RetailPack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@AllowUnPack" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="AllowUnPack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ManufactureBarCode" Precision="0" ProviderType="VarChar" Scale="0" Size="13" SourceColumn="ManufactureBarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@FixedPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="FixedPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@DefekturaAggregate" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="DefekturaAggregate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ChildId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ChildId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     CA.Goods.Id, CA.Goods.GId, CA.Goods.AssortmentId, CA.Goods.ManufacturerId, CA.Goods.CountryId, CA.Goods.WholesalePack, CA.Goods.RetailPack, 
                      CA.Goods.AllowUnPack, CA.Goods.ManufactureBarCode, CA.Goods.Note, CA.Goods.MD, CA.Goods.MW, CA.Goods.FixedPrice, CA.Assortment.Name, 
                      CO.Countries.Name AS CountryName, CO.Manufacturers.Name AS ManufactureName, CA.Goods.Id AS Original_Id, CA.Goods.MD AS Original_MD, 
                      CA.Goods.ToDelete, CA.Goods.DefekturaAggregate, CA.Goods.ChildId, vwGoodsDetailed.FullName AS ChildName
FROM         CA.Goods INNER JOIN
                      CA.Assortment ON CA.Goods.AssortmentId = CA.Assortment.Id INNER JOIN
                      CO.Countries ON CA.Goods.CountryId = CO.Countries.Id INNER JOIN
                      CO.Manufacturers ON CA.Goods.ManufacturerId = CO.Manufacturers.Id LEFT OUTER JOIN
                      vwGoodsDetailed ON CA.Goods.ChildId = vwGoodsDetailed.Id
WHERE     (CA.Goods.ToDelete = 0) OR
                      (CA.Goods.ToDelete = @ToDelete)
ORDER BY CA.Assortment.Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ToDelete" ColumnName="ToDelete" DataSourceName="DIOffice.CA.Goods" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>GoodsUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AssortmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssortmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ManufacturerId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ManufacturerId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CountryId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CountryId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@WholesalePack" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="WholesalePack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RetailPack" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="RetailPack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@AllowUnPack" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="AllowUnPack" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ManufactureBarCode" Precision="0" ProviderType="VarChar" Scale="0" Size="13" SourceColumn="ManufactureBarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@FixedPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="FixedPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Original_Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@DefekturaAggregate " Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="DefekturaAggregate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ChildId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ChildId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="AssortmentId" DataSetColumn="AssortmentId" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="CountryId" DataSetColumn="CountryId" />
              <Mapping SourceColumn="WholesalePack" DataSetColumn="WholesalePack" />
              <Mapping SourceColumn="RetailPack" DataSetColumn="RetailPack" />
              <Mapping SourceColumn="AllowUnPack" DataSetColumn="AllowUnPack" />
              <Mapping SourceColumn="ManufactureBarCode" DataSetColumn="ManufactureBarCode" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="FixedPrice" DataSetColumn="FixedPrice" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="ManufactureName" DataSetColumn="ManufactureName" />
              <Mapping SourceColumn="Original_Id" DataSetColumn="Original_Id" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
              <Mapping SourceColumn="DefekturaAggregate" DataSetColumn="DefekturaAggregate" />
              <Mapping SourceColumn="ChildId" DataSetColumn="ChildId" />
              <Mapping SourceColumn="ChildName" DataSetColumn="ChildName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AssessmentGroupTableAdapter" GeneratorDataComponentClassName="AssessmentGroupTableAdapter" Name="AssessmentGroup" UserDataComponentName="AssessmentGroupTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="SyncDict.CO.AssessmentGroup" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>AssessmentGroupDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>AssessmentGroupInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, Name, Note, MD, MW, MD AS OriginalMD, ToDelete
FROM         CO.AssessmentGroup
ORDER BY Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>AssessmentGroupUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="OriginalMD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="OriginalMD" DataSetColumn="OriginalMD" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AssortmentTableAdapter" GeneratorDataComponentClassName="AssortmentTableAdapter" Name="Assortment" UserDataComponentName="AssortmentTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>AssortmentDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>AssortmentInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CatalogId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CatalogId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="150" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@MedFormId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="MedFormId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AssesmentGroupId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssesmentGroupId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@ABList" Precision="0" ProviderType="Char" Scale="0" Size="1" SourceColumn="ABList" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@NotPatentedRus" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="NotPatentedRus" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@NotPatentedLat" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="NotPatentedLat" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@GNVLS" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="GNVLS" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Mandatory" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Mandatory" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@StoreTemperature" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="StoreTemperature" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@BeforeOverdue" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="BeforeOverdue" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@NoRecipe" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="NoRecipe" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ReferentPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ReferentPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReferentDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReferentDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     CA.Assortment.Id, CA.Assortment.GId, CA.Assortment.CatalogId, CA.Assortment.Name, CA.Assortment.MedFormId, CA.Assortment.AssesmentGroupId, 
                      CA.Assortment.ABList, CA.Assortment.NotPatentedRus, CA.Assortment.NotPatentedLat, CA.Assortment.GNVLS, CA.Assortment.Mandatory, 
                      CA.Assortment.StoreTemperature, CA.Assortment.BeforeOverdue, CA.Assortment.NoRecipe, CA.Assortment.ReferentPrice, CA.Assortment.ReferentDate, 
                      CA.Assortment.Note, CA.Assortment.MD, CA.Assortment.MW, CA.Assortment.MD AS Original_MD, CO.Catalog.Name AS CatalogName, 
                      CO.MedForm.Name AS MedFormName, CO.AssessmentGroup.Name AS AssessmentGroupName, CA.Assortment.ToDelete
FROM         CA.Assortment INNER JOIN
                      CO.AssessmentGroup ON CA.Assortment.AssesmentGroupId = CO.AssessmentGroup.Id INNER JOIN
                      CO.Catalog ON CA.Assortment.CatalogId = CO.Catalog.Id INNER JOIN
                      CO.MedForm ON CA.Assortment.MedFormId = CO.MedForm.Id
WHERE     (CA.Assortment.ToDelete = 0) OR
                      (CA.Assortment.ToDelete = @ToDetete)
ORDER BY CA.Assortment.Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ToDetete" ColumnName="ToDelete" DataSourceName="DIOffice.CA.Assortment" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ToDetete" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>AssortmentUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CatalogId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CatalogId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="150" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@MedFormId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="MedFormId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AssesmentGroupId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssesmentGroupId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@ABList" Precision="0" ProviderType="Char" Scale="0" Size="1" SourceColumn="ABList" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@NotPatentedRus" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="NotPatentedRus" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@NotPatentedLat" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="NotPatentedLat" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@GNVLS" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="GNVLS" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Mandatory" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Mandatory" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@StoreTemperature" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="StoreTemperature" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@BeforeOverdue" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="BeforeOverdue" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@NoRecipe" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="NoRecipe" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ReferentPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ReferentPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReferentDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReferentDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Original_MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ToDelete" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ToDelete" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="CatalogId" DataSetColumn="CatalogId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="MedFormId" DataSetColumn="MedFormId" />
              <Mapping SourceColumn="AssesmentGroupId" DataSetColumn="AssesmentGroupId" />
              <Mapping SourceColumn="ABList" DataSetColumn="ABList" />
              <Mapping SourceColumn="NotPatentedRus" DataSetColumn="NotPatentedRus" />
              <Mapping SourceColumn="NotPatentedLat" DataSetColumn="NotPatentedLat" />
              <Mapping SourceColumn="GNVLS" DataSetColumn="GNVLS" />
              <Mapping SourceColumn="Mandatory" DataSetColumn="Mandatory" />
              <Mapping SourceColumn="StoreTemperature" DataSetColumn="StoreTemperature" />
              <Mapping SourceColumn="BeforeOverdue" DataSetColumn="BeforeOverdue" />
              <Mapping SourceColumn="NoRecipe" DataSetColumn="NoRecipe" />
              <Mapping SourceColumn="ReferentPrice" DataSetColumn="ReferentPrice" />
              <Mapping SourceColumn="ReferentDate" DataSetColumn="ReferentDate" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Original_MD" DataSetColumn="Original_MD" />
              <Mapping SourceColumn="CatalogName" DataSetColumn="CatalogName" />
              <Mapping SourceColumn="MedFormName" DataSetColumn="MedFormName" />
              <Mapping SourceColumn="AssessmentGroupName" DataSetColumn="AssessmentGroupName" />
              <Mapping SourceColumn="ToDelete" DataSetColumn="ToDelete" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentsTableAdapter" GeneratorDataComponentClassName="DepartmentsTableAdapter" Name="Departments" UserDataComponentName="DepartmentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.DepartmentsSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.DepartmentsDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.DepartmentsInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.DepartmentsSelect</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.DepartmentsUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ShortName" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ShortName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ShortName" DataSetColumn="ShortName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PartiesTableAdapter" GeneratorDataComponentClassName="PartiesTableAdapter" Name="Parties" UserDataComponentName="PartiesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>IF @SupplierId IS NULL SELECT     Id = p.Id, GoodsId = p.GoodsId, Name = v.FullName, ManufacturerId = g.ManufacturerId, 
                                                                           ManufacturerName = v.ManufacturerName, CountryName = v.CountryName, RetailPrice = p.RetailPrice, Qntty = p.RestQntty, 
                                                                           Barcode = p.Barcode, Note = p.Note, Expiration = CONVERT(bit, CASE WHEN v.BeforeOverdue IS NOT NULL AND 
                                                                           l.ReadyBefore IS NOT NULL AND dateadd(d, v.BeforeOverdue, dbo.TodayDate()) &gt; l.ReadyBefore THEN 1 ELSE 0 END), 
                                                                           SupplierDocId = l.DocId, AllowUnPack = v.AllowUnPack, RetailPack = v.RetailPack, ChildGoodsId = v.ChildId, MD = p.MD, 
                                                                           MW = p.MW, l.ReadyBefore, d .DocDate
                                                    FROM         cd.Parties p JOIN
                                                                           cd.InputLines l ON l.Id = p.InputLineId JOIN
                                                                           dbo.vwGoodsDetailed v ON v.Id = p.GoodsId JOIN
                                                                           ca.Goods g ON g.Id = p.GoodsId INNER JOIN
                                                                           CA.Documents AS d ON d .Id = l.DocId
                                                    WHERE     @PartyId IS NOT NULL AND p.Id = @PartyId OR
                                                                           @PartyId IS NULL AND (@CheckRest = 1 AND p.RestQntty &gt; 0 OR
                                                                           @CheckRest = 0) AND p.DepartmentId IN
                                                                               (SELECT     TOP 1 PR.DepartmentOptions.DepartmentId
                                                                                 FROM          PR.DepartmentOptions)
                                                    ORDER BY v.FullName, v.ManufacturerName ELSE
                                                                               SELECT     Id = p.Id, GoodsId = p.GoodsId, Name = v.FullName, ManufacturerId = g.ManufacturerId, 
                                                                                                       ManufacturerName = v.ManufacturerName, CountryName = v.CountryName, RetailPrice = l.SupplierPrice, 
                                                                                                       Qntty = CASE WHEN l.DocQntty &lt; p.RestQntty THEN l.DocQntty ELSE p.RestQntty END, Barcode = p.Barcode, 
                                                                                                       Note = p.Note, Expiration = CONVERT(bit, CASE WHEN v.BeforeOverdue IS NOT NULL AND 
                                                                                                       l.ReadyBefore IS NOT NULL AND dateadd(d, v.BeforeOverdue, dbo.TodayDate()) 
                                                                                                       &gt; l.ReadyBefore THEN 1 ELSE 0 END), SupplierDocId = l.DocId, AllowUnPack = v.AllowUnPack, 
                                                                                                       RetailPack = v.RetailPack, ChildGoodsId = v.ChildId, MD = p.MD, MW = p.MW, l.ReadyBefore, d .DocDate
                                                                                FROM         cd.Parties p JOIN
                                                                                                       cd.InputLines l ON l.Id = p.InputLineId JOIN
                                                                                                       ca.Documents d ON d .Id = l.DocId AND d .ContragentId = @SupplierId AND (@SupplierDocId IS NULL OR
                                                                                                       @SupplierDocId IS NOT NULL AND d .Id = @SupplierDocId) JOIN
                                                                                                       dbo.vwGoodsDetailed v ON v.Id = p.GoodsId JOIN
                                                                                                       ca.Goods g ON g.Id = p.GoodsId INNER JOIN
                                                                                                       CA.Documents ON d .Id = l.DocId
                                                                                WHERE     @PartyId IS NOT NULL AND p.Id = @PartyId OR
                                                                                                       @PartyId IS NULL AND (@CheckRest = 1 AND p.RestQntty &gt; 0 OR
                                                                                                       @CheckRest = 0)
                                                                                ORDER BY v.FullName, v.ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@PartyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@CheckRest" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SupplierId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SupplierDocId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="Barcode" DataSetColumn="Barcode" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Expiration" DataSetColumn="Expiration" />
              <Mapping SourceColumn="SupplierDocId" DataSetColumn="SupplierDocId" />
              <Mapping SourceColumn="AllowUnPack" DataSetColumn="AllowUnPack" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="RetailPack" DataSetColumn="RetailPack" />
              <Mapping SourceColumn="ChildGoodsId" DataSetColumn="ChildGoodsId" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="RepriceWriteoffReasonTableAdapter" GeneratorDataComponentClassName="RepriceWriteoffReasonTableAdapter" Name="RepriceWriteoffReason" UserDataComponentName="RepriceWriteoffReasonTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CO.RepriceWriteoffReason" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>DELETE FROM [co].[RepriceWriteoffReason] WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ((@IsNull_Note = 1 AND [Note] IS NULL) OR ([Note] = @Original_Note)) AND ([MD] = @Original_MD) AND ([MW] = @Original_MW))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Note" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="True" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Note" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_MW" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>INSERT INTO [co].[RepriceWriteoffReason] ([Name], [Note], [MD], [MW]) VALUES (@Name, @Note, @MD, @MW);
SELECT Id, Name, Note, MD, MW FROM CO.RepriceWriteoffReason WHERE (Id = SCOPE_IDENTITY()) ORDER BY CASE Id WHEN 1 THEN '  ' WHEN 2 THEN 'я' ELSE '' END + Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id
	,	Name
	,	Note
	,	MD
	,	MW
from co.RepriceWriteoffReason
order by case Id when 1 then '  ' when 2 then 'я' else '' end + Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>UPDATE [co].[RepriceWriteoffReason] SET [Name] = @Name, [Note] = @Note, [MD] = @MD, [MW] = @MW WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ((@IsNull_Note = 1 AND [Note] IS NULL) OR ([Note] = @Original_Note)) AND ([MD] = @Original_MD) AND ([MW] = @Original_MW));
SELECT Id, Name, Note, MD, MW FROM CO.RepriceWriteoffReason WHERE (Id = @Id) ORDER BY CASE Id WHEN 1 THEN '  ' WHEN 2 THEN 'я' ELSE '' END + Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Note" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="True" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Note" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_MW" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIApteka.CO.RepriceWriteoffReason" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="vwGoodsDetailedTableAdapter" GeneratorDataComponentClassName="vwGoodsDetailedTableAdapter" Name="vwGoodsDetailed" UserDataComponentName="vwGoodsDetailedTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.dbo.vwGoodsDetailed" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, FullName
FROM         vwGoodsDetailed
WHERE     (ToDelete = 0)
ORDER BY FullName</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AssortmentSmallTableAdapter" GeneratorDataComponentClassName="AssortmentSmallTableAdapter" Name="AssortmentSmall" UserDataComponentName="AssortmentSmallTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Assortment" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select CA.Assortment.Id,CA.Assortment.[Name] from CA.Assortment
order by CA.Assortment.[Name]</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LastGodsTableAdapter" GeneratorDataComponentClassName="LastGodsTableAdapter" Name="LastGods" UserDataComponentName="LastGodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     CA.Goods.Id, CA.Goods.GId, CA.Goods.AssortmentId, CA.Goods.ManufacturerId, CA.Goods.CountryId, CA.Goods.WholesalePack, CA.Goods.RetailPack, 
                      CA.Goods.AllowUnPack, CA.Goods.Note, CA.Assortment.Name, CO.Countries.Name AS CountryName, CO.Manufacturers.Name AS ManufactureName, 
                      vwGoodsDetailed.FullName AS ChildName
FROM         CA.Goods INNER JOIN
                      CA.Assortment ON CA.Goods.AssortmentId = CA.Assortment.Id INNER JOIN
                      CO.Countries ON CA.Goods.CountryId = CO.Countries.Id INNER JOIN
                      CO.Manufacturers ON CA.Goods.ManufacturerId = CO.Manufacturers.Id LEFT OUTER JOIN
                      vwGoodsDetailed ON CA.Goods.ChildId = vwGoodsDetailed.Id
WHERE     (CA.Goods.Id =
                          (SELECT     MAX(Id) AS Expr1
                            FROM          CA.Goods AS Goods_1))
ORDER BY CA.Assortment.Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="AssortmentId" DataSetColumn="AssortmentId" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="CountryId" DataSetColumn="CountryId" />
              <Mapping SourceColumn="WholesalePack" DataSetColumn="WholesalePack" />
              <Mapping SourceColumn="RetailPack" DataSetColumn="RetailPack" />
              <Mapping SourceColumn="AllowUnPack" DataSetColumn="AllowUnPack" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="ManufactureName" DataSetColumn="ManufactureName" />
              <Mapping SourceColumn="ChildName" DataSetColumn="ChildName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LinkTableAdapter" GeneratorDataComponentClassName="LinkTableAdapter" Name="Link" UserDataComponentName="LinkTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     vwGoodsDetailed.Id AS innerId, vwGoodsDetailed.FullName AS innerName, vwGoodsDetailed.ManufacturerName AS innerManufacturer, 
                      vwGoodsDetailed.CountryName AS innerCountry, CA.GoodsVsContragents.Id AS linkId, CA.GoodsVsContragents.GoodsName AS outerName, 
                      CA.GoodsVsContragents.CountryName AS outerCountry, CA.GoodsVsContragents.ManufacturerName AS outerManufacturer, 
                      CA.GoodsVsContragents.GoodsCode AS outerId, CA.GoodsVsContragents.Note, CA.GoodsVsContragents.MD, CA.GoodsVsContragents.MW
FROM         vwGoodsDetailed INNER JOIN
                      CA.GoodsVsContragents ON vwGoodsDetailed.Id = CA.GoodsVsContragents.GoodsId
WHERE     (CA.GoodsVsContragents.ContragentId = @ContragentId) AND (CA.GoodsVsContragents.ToDelete = 0)
ORDER BY innerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ContragentId" ColumnName="ContragentId" DataSourceName="DIApteka.CA.GoodsVsContragents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContragentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="innerId" DataSetColumn="innerId" />
              <Mapping SourceColumn="innerName" DataSetColumn="innerName" />
              <Mapping SourceColumn="innerManufacturer" DataSetColumn="innerManufacturer" />
              <Mapping SourceColumn="innerCountry" DataSetColumn="innerCountry" />
              <Mapping SourceColumn="linkId" DataSetColumn="linkId" />
              <Mapping SourceColumn="outerName" DataSetColumn="outerName" />
              <Mapping SourceColumn="outerCountry" DataSetColumn="outerCountry" />
              <Mapping SourceColumn="outerManufacturer" DataSetColumn="outerManufacturer" />
              <Mapping SourceColumn="outerId" DataSetColumn="outerId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentUsersTableAdapter" GeneratorDataComponentClassName="DepartmentUsersTableAdapter" Name="DepartmentUsers" UserDataComponentName="DepartmentUsersTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.CD.DepartmentUsers" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>DepartmentUsersDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CreateDIUser</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UserName" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="Login" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UserPassword" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@FirstName" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="FirstName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@SecondName" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="SecondName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@LastName" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="LastName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@NewUserId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, Login, FirstName, SecondName, LastName, Note, MD, MW, DepartmentId
FROM         CD.DepartmentUsers</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>DepartmentUsersUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@FirstName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="FirstName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@SecondName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SecondName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@LastName" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="LastName" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Login" DataSetColumn="Login" />
              <Mapping SourceColumn="FirstName" DataSetColumn="FirstName" />
              <Mapping SourceColumn="SecondName" DataSetColumn="SecondName" />
              <Mapping SourceColumn="LastName" DataSetColumn="LastName" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="Link1TableAdapter" GeneratorDataComponentClassName="Link1TableAdapter" Name="Link1" UserDataComponentName="Link1TableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     vwGoodsDetailed.Id AS innerId, vwGoodsDetailed.FullName AS innerName, vwGoodsDetailed.ManufacturerName AS innerManufacturer, 
                      vwGoodsDetailed.CountryName AS innerCountry, CA.GoodsVsContragents.Id AS linkId, CA.GoodsVsContragents.GoodsName AS outerName, 
                      CA.GoodsVsContragents.CountryName AS outerCountry, CA.GoodsVsContragents.ManufacturerName AS outerManufacturer, 
                      CA.GoodsVsContragents.GoodsCode AS outerId, CA.GoodsVsContragents.Note, CA.GoodsVsContragents.MD, CA.GoodsVsContragents.MW
FROM         vwGoodsDetailed INNER JOIN
                      CA.GoodsVsContragents ON vwGoodsDetailed.Id = CA.GoodsVsContragents.GoodsId
WHERE     (CA.GoodsVsContragents.ContragentId = @ContragentId)
ORDER BY innerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="ContragentId" ColumnName="ContragentId" DataSourceName="DIApteka1.CA.GoodsVsContragents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContragentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="innerId" DataSetColumn="innerId" />
              <Mapping SourceColumn="innerName" DataSetColumn="innerName" />
              <Mapping SourceColumn="innerManufacturer" DataSetColumn="innerManufacturer" />
              <Mapping SourceColumn="innerCountry" DataSetColumn="innerCountry" />
              <Mapping SourceColumn="linkId" DataSetColumn="linkId" />
              <Mapping SourceColumn="outerName" DataSetColumn="outerName" />
              <Mapping SourceColumn="outerCountry" DataSetColumn="outerCountry" />
              <Mapping SourceColumn="outerManufacturer" DataSetColumn="outerManufacturer" />
              <Mapping SourceColumn="outerId" DataSetColumn="outerId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AggregatedGoodsTableAdapter" GeneratorDataComponentClassName="AggregatedGoodsTableAdapter" Name="AggregatedGoods" UserDataComponentName="AggregatedGoodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Goods" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>DELETE FROM [CA].[Goods] WHERE (([Id] = @p2) AND ([Id] = @Original_Id))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id1" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>INSERT INTO [CA].[Goods] ([Id], [Id]) VALUES (@p1, @Id);
SELECT g1.Id, g2.Id AS Expr1 FROM CA.Goods AS g1 INNER JOIN CA.Goods AS g2 ON g1.AssortmentId = g2.AssortmentId AND g1.RetailPack = g2.RetailPack WHERE (g1.Id = @Id1) AND (g1.Id = @Id2) ORDER BY g1.Id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id1" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id1" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id1" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id2" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id2" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     g1.Id
FROM         CA.Goods AS g1 INNER JOIN
                      CA.Goods AS g2 ON g1.AssortmentId = g2.AssortmentId AND g1.RetailPack = g2.RetailPack
WHERE     (g1.ToDelete = 0) AND (g1.DefekturaAggregate = 1) AND (g2.Id = @GoodsId) AND (g2.DefekturaAggregate = 1)
ORDER BY g1.Id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="GoodsId" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@GoodsId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>UPDATE [CA].[Goods] SET [Id] = @p1, [Id] = @Id WHERE (([Id] = @p2) AND ([Id] = @Original_Id));
SELECT g1.Id, g2.Id AS Expr1 FROM CA.Goods AS g1 INNER JOIN CA.Goods AS g2 ON g1.AssortmentId = g2.AssortmentId AND g1.RetailPack = g2.RetailPack WHERE (g1.Id = @Id1) AND (g1.Id = @Id2) ORDER BY g1.Id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id1" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id1" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id1" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id1" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id2" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id2" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Preparat.CA.Assortment" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="AssortmentQuery" MethodsParameterType="CLR" Modifier="Public" Name="AssortmentQuery" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="AssortmentQuery">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Id
FROM         CA.Assortment
WHERE     (Name = @Name) AND (MedFormId = @MedFormId) AND (ToDelete = 0)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Name" ColumnName="Name" DataSourceName="Preparat.CA.Assortment" DataTypeServer="varchar(150)" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="150" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="MedFormId" ColumnName="MedFormId" DataSourceName="Preparat.CA.Assortment" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@MedFormId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="MedFormId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Preparat.CA.Goods" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GoodsQuery" MethodsParameterType="CLR" Modifier="Public" Name="GoodsQuery" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="GoodsQuery">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     Id
FROM         CA.Goods
WHERE     (AssortmentId = @AssortmentId) AND (ManufacturerId = @ManufacturerId) AND (CountryId = @CountryId) AND (RetailPack = @RetailPack) AND 
                      (ToDelete = 0)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="AssortmentId" ColumnName="AssortmentId" DataSourceName="Preparat.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@AssortmentId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="AssortmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="ManufacturerId" ColumnName="ManufacturerId" DataSourceName="Preparat.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ManufacturerId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ManufacturerId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="CountryId" ColumnName="CountryId" DataSourceName="Preparat.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CountryId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CountryId" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="False" AutogeneratedName="RetailPack" ColumnName="RetailPack" DataSourceName="Preparat.CA.Goods" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@RetailPack" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="RetailPack" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Dictionary" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Dictionary" msprop:Generator_DataSetName="Dictionary">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Catalog" msprop:Generator_UserTableName="Catalog" msprop:Generator_RowDeletedName="CatalogRowDeleted" msprop:Generator_RowChangedName="CatalogRowChanged" msprop:Generator_RowClassName="CatalogRow" msprop:Generator_RowChangingName="CatalogRowChanging" msprop:Generator_RowEvArgName="CatalogRowChangeEvent" msprop:Generator_RowEvHandlerName="CatalogRowChangeEventHandler" msprop:Generator_TableClassName="CatalogDataTable" msprop:Generator_TableVarName="tableCatalog" msprop:Generator_RowDeletingName="CatalogRowDeleting" msprop:Generator_TablePropName="Catalog">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OriginalID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="OriginalID" msprop:Generator_ColumnPropNameInRow="OriginalID" msprop:Generator_ColumnVarNameInTable="columnOriginalID" msprop:Generator_ColumnPropNameInTable="OriginalIDColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MarkUp" msprop:Generator_UserColumnName="MarkUp" msprop:Generator_ColumnPropNameInRow="MarkUp" msprop:Generator_ColumnVarNameInTable="columnMarkUp" msprop:Generator_ColumnPropNameInTable="MarkUpColumn" type="xs:double" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" />
              <xs:element name="ParentName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ParentName" msprop:Generator_ColumnPropNameInRow="ParentName" msprop:Generator_ColumnVarNameInTable="columnParentName" msprop:Generator_ColumnPropNameInTable="ParentNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Countries" msprop:Generator_UserTableName="Countries" msprop:Generator_RowDeletedName="CountriesRowDeleted" msprop:Generator_RowChangedName="CountriesRowChanged" msprop:Generator_RowClassName="CountriesRow" msprop:Generator_RowChangingName="CountriesRowChanging" msprop:Generator_RowEvArgName="CountriesRowChangeEvent" msprop:Generator_RowEvHandlerName="CountriesRowChangeEventHandler" msprop:Generator_TableClassName="CountriesDataTable" msprop:Generator_TableVarName="tableCountries" msprop:Generator_RowDeletingName="CountriesRowDeleting" msprop:Generator_TablePropName="Countries">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShortName" msprop:Generator_UserColumnName="ShortName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ShortName" msprop:Generator_ColumnPropNameInTable="ShortNameColumn" msprop:Generator_ColumnVarNameInTable="columnShortName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Original_ID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Original_ID" msprop:Generator_ColumnPropNameInRow="Original_ID" msprop:Generator_ColumnVarNameInTable="columnOriginal_ID" msprop:Generator_ColumnPropNameInTable="Original_IDColumn" type="xs:int" />
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="MedForm" msprop:Generator_UserTableName="MedForm" msprop:Generator_RowDeletedName="MedFormRowDeleted" msprop:Generator_RowChangedName="MedFormRowChanged" msprop:Generator_RowClassName="MedFormRow" msprop:Generator_RowChangingName="MedFormRowChanging" msprop:Generator_RowEvArgName="MedFormRowChangeEvent" msprop:Generator_RowEvHandlerName="MedFormRowChangeEventHandler" msprop:Generator_TableClassName="MedFormDataTable" msprop:Generator_TableVarName="tableMedForm" msprop:Generator_RowDeletingName="MedFormRowDeleting" msprop:Generator_TablePropName="MedForm">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShortName" msprop:Generator_UserColumnName="ShortName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnShortName" msprop:Generator_ColumnPropNameInTable="ShortNameColumn" msprop:Generator_ColumnPropNameInRow="ShortName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OriginalMD" msprop:Generator_UserColumnName="OriginalMD" msprop:Generator_ColumnVarNameInTable="columnOriginalMD" msprop:Generator_ColumnPropNameInRow="OriginalMD" msprop:Generator_ColumnPropNameInTable="OriginalMDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" default="false" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Contragents" msprop:Generator_UserTableName="Contragents" msprop:Generator_RowDeletedName="ContragentsRowDeleted" msprop:Generator_RowChangedName="ContragentsRowChanged" msprop:Generator_RowClassName="ContragentsRow" msprop:Generator_RowChangingName="ContragentsRowChanging" msprop:Generator_RowEvArgName="ContragentsRowChangeEvent" msprop:Generator_RowEvHandlerName="ContragentsRowChangeEventHandler" msprop:Generator_TableClassName="ContragentsDataTable" msprop:Generator_TableVarName="tableContragents" msprop:Generator_RowDeletingName="ContragentsRowDeleting" msprop:Generator_TablePropName="Contragents">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShortName" msprop:Generator_UserColumnName="ShortName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnShortName" msprop:Generator_ColumnPropNameInTable="ShortNameColumn" msprop:Generator_ColumnPropNameInRow="ShortName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IsSeller" msprop:Generator_UserColumnName="IsSeller" msprop:Generator_ColumnVarNameInTable="columnIsSeller" msprop:Generator_ColumnPropNameInRow="IsSeller" msprop:Generator_ColumnPropNameInTable="IsSellerColumn" type="xs:boolean" />
              <xs:element name="IsCustomer" msprop:Generator_UserColumnName="IsCustomer" msprop:Generator_ColumnVarNameInTable="columnIsCustomer" msprop:Generator_ColumnPropNameInRow="IsCustomer" msprop:Generator_ColumnPropNameInTable="IsCustomerColumn" type="xs:boolean" />
              <xs:element name="IsSertification" msprop:Generator_UserColumnName="IsSertification" msprop:Generator_ColumnVarNameInTable="columnIsSertification" msprop:Generator_ColumnPropNameInRow="IsSertification" msprop:Generator_ColumnPropNameInTable="IsSertificationColumn" type="xs:boolean" />
              <xs:element name="EMail" msprop:Generator_UserColumnName="EMail" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnEMail" msprop:Generator_ColumnPropNameInTable="EMailColumn" msprop:Generator_ColumnPropNameInRow="EMail" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Phone" msprop:Generator_UserColumnName="Phone" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnPhone" msprop:Generator_ColumnPropNameInTable="PhoneColumn" msprop:Generator_ColumnPropNameInRow="Phone" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FirmType" msprop:Generator_UserColumnName="FirmType" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnFirmType" msprop:Generator_ColumnPropNameInTable="FirmTypeColumn" msprop:Generator_ColumnPropNameInRow="FirmType" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="10" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="JuridicalAddress" msprop:Generator_UserColumnName="JuridicalAddress" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnJuridicalAddress" msprop:Generator_ColumnPropNameInTable="JuridicalAddressColumn" msprop:Generator_ColumnPropNameInRow="JuridicalAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="INN" msprop:Generator_UserColumnName="INN" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnINN" msprop:Generator_ColumnPropNameInTable="INNColumn" msprop:Generator_ColumnPropNameInRow="INN" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="KPP" msprop:Generator_UserColumnName="KPP" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnKPP" msprop:Generator_ColumnPropNameInTable="KPPColumn" msprop:Generator_ColumnPropNameInRow="KPP" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OKPO" msprop:Generator_UserColumnName="OKPO" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnOKPO" msprop:Generator_ColumnPropNameInTable="OKPOColumn" msprop:Generator_ColumnPropNameInRow="OKPO" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OKONX" msprop:Generator_UserColumnName="OKONX" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="OKONX" msprop:Generator_ColumnPropNameInTable="OKONXColumn" msprop:Generator_ColumnVarNameInTable="columnOKONX" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SettlementAccount" msprop:Generator_UserColumnName="SettlementAccount" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="SettlementAccount" msprop:Generator_ColumnPropNameInTable="SettlementAccountColumn" msprop:Generator_ColumnVarNameInTable="columnSettlementAccount" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Bank" msprop:Generator_UserColumnName="Bank" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Bank" msprop:Generator_ColumnPropNameInTable="BankColumn" msprop:Generator_ColumnVarNameInTable="columnBank" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BIK" msprop:Generator_UserColumnName="BIK" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="BIK" msprop:Generator_ColumnPropNameInTable="BIKColumn" msprop:Generator_ColumnVarNameInTable="columnBIK" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="10" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CorrespondentAccount" msprop:Generator_UserColumnName="CorrespondentAccount" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CorrespondentAccount" msprop:Generator_ColumnPropNameInTable="CorrespondentAccountColumn" msprop:Generator_ColumnVarNameInTable="columnCorrespondentAccount" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ActualAddress" msprop:Generator_UserColumnName="ActualAddress" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ActualAddress" msprop:Generator_ColumnPropNameInTable="ActualAddressColumn" msprop:Generator_ColumnVarNameInTable="columnActualAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Fax" msprop:Generator_UserColumnName="Fax" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Fax" msprop:Generator_ColumnPropNameInTable="FaxColumn" msprop:Generator_ColumnVarNameInTable="columnFax" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="WebPage" msprop:Generator_UserColumnName="WebPage" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="WebPage" msprop:Generator_ColumnPropNameInTable="WebPageColumn" msprop:Generator_ColumnVarNameInTable="columnWebPage" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ICQ" msprop:Generator_UserColumnName="ICQ" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ICQ" msprop:Generator_ColumnPropNameInTable="ICQColumn" msprop:Generator_ColumnVarNameInTable="columnICQ" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Original_Id" msprop:Generator_UserColumnName="Original_Id" msprop:Generator_ColumnPropNameInRow="Original_Id" msprop:Generator_ColumnVarNameInTable="columnOriginal_Id" msprop:Generator_ColumnPropNameInTable="Original_IdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DirectorFIO" msprop:Generator_UserColumnName="DirectorFIO" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDirectorFIO" msprop:Generator_ColumnPropNameInTable="DirectorFIOColumn" msprop:Generator_ColumnPropNameInRow="DirectorFIO" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DirectorPosition" msprop:Generator_UserColumnName="DirectorPosition" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDirectorPosition" msprop:Generator_ColumnPropNameInTable="DirectorPositionColumn" msprop:Generator_ColumnPropNameInRow="DirectorPosition" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" default="false" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Manufacturers" msprop:Generator_UserTableName="Manufacturers" msprop:Generator_RowDeletedName="ManufacturersRowDeleted" msprop:Generator_RowChangedName="ManufacturersRowChanged" msprop:Generator_RowClassName="ManufacturersRow" msprop:Generator_RowChangingName="ManufacturersRowChanging" msprop:Generator_RowEvArgName="ManufacturersRowChangeEvent" msprop:Generator_RowEvHandlerName="ManufacturersRowChangeEventHandler" msprop:Generator_TableClassName="ManufacturersDataTable" msprop:Generator_TableVarName="tableManufacturers" msprop:Generator_RowDeletingName="ManufacturersRowDeleting" msprop:Generator_TablePropName="Manufacturers">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="CountryId" msprop:Generator_UserColumnName="CountryId" msprop:Generator_ColumnPropNameInRow="CountryId" msprop:Generator_ColumnVarNameInTable="columnCountryId" msprop:Generator_ColumnPropNameInTable="CountryIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShortName" msprop:Generator_UserColumnName="ShortName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ShortName" msprop:Generator_ColumnPropNameInTable="ShortNameColumn" msprop:Generator_ColumnVarNameInTable="columnShortName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LatName" msprop:Generator_UserColumnName="LatName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="LatName" msprop:Generator_ColumnPropNameInTable="LatNameColumn" msprop:Generator_ColumnVarNameInTable="columnLatName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CountryName" msdata:ReadOnly="true" msdata:Expression="Parent.Name" msprop:Generator_UserColumnName="CountryName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" msprop:Generator_ColumnPropNameInRow="CountryName" type="xs:string" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Goods" msprop:Generator_UserTableName="Goods" msprop:Generator_RowDeletedName="GoodsRowDeleted" msprop:Generator_RowChangedName="GoodsRowChanged" msprop:Generator_RowClassName="GoodsRow" msprop:Generator_RowChangingName="GoodsRowChanging" msprop:Generator_RowEvArgName="GoodsRowChangeEvent" msprop:Generator_RowEvHandlerName="GoodsRowChangeEventHandler" msprop:Generator_TableClassName="GoodsDataTable" msprop:Generator_TableVarName="tableGoods" msprop:Generator_RowDeletingName="GoodsRowDeleting" msprop:Generator_TablePropName="Goods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="AssortmentId" msprop:Generator_UserColumnName="AssortmentId" msprop:Generator_ColumnVarNameInTable="columnAssortmentId" msprop:Generator_ColumnPropNameInRow="AssortmentId" msprop:Generator_ColumnPropNameInTable="AssortmentIdColumn" type="xs:int" />
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" />
              <xs:element name="CountryId" msprop:Generator_UserColumnName="CountryId" msprop:Generator_ColumnVarNameInTable="columnCountryId" msprop:Generator_ColumnPropNameInRow="CountryId" msprop:Generator_ColumnPropNameInTable="CountryIdColumn" type="xs:int" />
              <xs:element name="WholesalePack" msprop:Generator_UserColumnName="WholesalePack" msprop:Generator_ColumnVarNameInTable="columnWholesalePack" msprop:Generator_ColumnPropNameInRow="WholesalePack" msprop:Generator_ColumnPropNameInTable="WholesalePackColumn" type="xs:int" />
              <xs:element name="RetailPack" msprop:Generator_UserColumnName="RetailPack" msprop:Generator_ColumnVarNameInTable="columnRetailPack" msprop:Generator_ColumnPropNameInRow="RetailPack" msprop:Generator_ColumnPropNameInTable="RetailPackColumn" type="xs:int" />
              <xs:element name="AllowUnPack" msprop:Generator_UserColumnName="AllowUnPack" msprop:Generator_ColumnVarNameInTable="columnAllowUnPack" msprop:Generator_ColumnPropNameInRow="AllowUnPack" msprop:Generator_ColumnPropNameInTable="AllowUnPackColumn" type="xs:boolean" />
              <xs:element name="ManufactureBarCode" msprop:Generator_UserColumnName="ManufactureBarCode" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufactureBarCode" msprop:Generator_ColumnPropNameInTable="ManufactureBarCodeColumn" msprop:Generator_ColumnPropNameInRow="ManufactureBarCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="13" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FixedPrice" msprop:Generator_UserColumnName="FixedPrice" msprop:Generator_ColumnPropNameInRow="FixedPrice" msprop:Generator_ColumnVarNameInTable="columnFixedPrice" msprop:Generator_ColumnPropNameInTable="FixedPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" msprop:Generator_ColumnPropNameInRow="CountryName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufactureName" msprop:Generator_UserColumnName="ManufactureName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufactureName" msprop:Generator_ColumnPropNameInTable="ManufactureNameColumn" msprop:Generator_ColumnPropNameInRow="ManufactureName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Original_Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Original_Id" msprop:Generator_ColumnVarNameInTable="columnOriginal_Id" msprop:Generator_ColumnPropNameInRow="Original_Id" msprop:Generator_ColumnPropNameInTable="Original_IdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" default="false" />
              <xs:element name="DefekturaAggregate" msprop:Generator_UserColumnName="DefekturaAggregate" msprop:Generator_ColumnPropNameInRow="DefekturaAggregate" msprop:Generator_ColumnVarNameInTable="columnDefekturaAggregate" msprop:Generator_ColumnPropNameInTable="DefekturaAggregateColumn" type="xs:boolean" default="false" minOccurs="0" />
              <xs:element name="ChildId" msprop:Generator_UserColumnName="ChildId" msprop:Generator_ColumnPropNameInRow="ChildId" msprop:Generator_ColumnVarNameInTable="columnChildId" msprop:Generator_ColumnPropNameInTable="ChildIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ChildName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ChildName" msprop:Generator_ColumnPropNameInRow="ChildName" msprop:Generator_ColumnVarNameInTable="columnChildName" msprop:Generator_ColumnPropNameInTable="ChildNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AssessmentGroup" msprop:Generator_UserTableName="AssessmentGroup" msprop:Generator_RowDeletedName="AssessmentGroupRowDeleted" msprop:Generator_RowChangedName="AssessmentGroupRowChanged" msprop:Generator_RowClassName="AssessmentGroupRow" msprop:Generator_RowChangingName="AssessmentGroupRowChanging" msprop:Generator_RowEvArgName="AssessmentGroupRowChangeEvent" msprop:Generator_RowEvHandlerName="AssessmentGroupRowChangeEventHandler" msprop:Generator_TableClassName="AssessmentGroupDataTable" msprop:Generator_TableVarName="tableAssessmentGroup" msprop:Generator_RowDeletingName="AssessmentGroupRowDeleting" msprop:Generator_TablePropName="AssessmentGroup">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OriginalMD" msprop:Generator_UserColumnName="OriginalMD" msprop:Generator_ColumnVarNameInTable="columnOriginalMD" msprop:Generator_ColumnPropNameInRow="OriginalMD" msprop:Generator_ColumnPropNameInTable="OriginalMDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Assortment" msprop:Generator_UserTableName="Assortment" msprop:Generator_RowDeletedName="AssortmentRowDeleted" msprop:Generator_RowChangedName="AssortmentRowChanged" msprop:Generator_RowClassName="AssortmentRow" msprop:Generator_RowChangingName="AssortmentRowChanging" msprop:Generator_RowEvArgName="AssortmentRowChangeEvent" msprop:Generator_RowEvHandlerName="AssortmentRowChangeEventHandler" msprop:Generator_TableClassName="AssortmentDataTable" msprop:Generator_TableVarName="tableAssortment" msprop:Generator_RowDeletingName="AssortmentRowDeleting" msprop:Generator_TablePropName="Assortment">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CatalogId" msprop:Generator_UserColumnName="CatalogId" msprop:Generator_ColumnPropNameInRow="CatalogId" msprop:Generator_ColumnVarNameInTable="columnCatalogId" msprop:Generator_ColumnPropNameInTable="CatalogIdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MedFormId" msprop:Generator_UserColumnName="MedFormId" msprop:Generator_ColumnPropNameInRow="MedFormId" msprop:Generator_ColumnVarNameInTable="columnMedFormId" msprop:Generator_ColumnPropNameInTable="MedFormIdColumn" type="xs:int" />
              <xs:element name="AssesmentGroupId" msprop:Generator_UserColumnName="AssesmentGroupId" msprop:Generator_ColumnPropNameInRow="AssesmentGroupId" msprop:Generator_ColumnVarNameInTable="columnAssesmentGroupId" msprop:Generator_ColumnPropNameInTable="AssesmentGroupIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ABList" msprop:Generator_UserColumnName="ABList" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnABList" msprop:Generator_ColumnPropNameInTable="ABListColumn" msprop:Generator_ColumnPropNameInRow="ABList" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NotPatentedRus" msprop:Generator_UserColumnName="NotPatentedRus" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNotPatentedRus" msprop:Generator_ColumnPropNameInTable="NotPatentedRusColumn" msprop:Generator_ColumnPropNameInRow="NotPatentedRus" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NotPatentedLat" msprop:Generator_UserColumnName="NotPatentedLat" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNotPatentedLat" msprop:Generator_ColumnPropNameInTable="NotPatentedLatColumn" msprop:Generator_ColumnPropNameInRow="NotPatentedLat" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GNVLS" msprop:Generator_UserColumnName="GNVLS" msprop:Generator_ColumnPropNameInRow="GNVLS" msprop:Generator_ColumnVarNameInTable="columnGNVLS" msprop:Generator_ColumnPropNameInTable="GNVLSColumn" type="xs:boolean" minOccurs="0" />
              <xs:element name="Mandatory" msprop:Generator_UserColumnName="Mandatory" msprop:Generator_ColumnPropNameInRow="Mandatory" msprop:Generator_ColumnVarNameInTable="columnMandatory" msprop:Generator_ColumnPropNameInTable="MandatoryColumn" type="xs:boolean" />
              <xs:element name="StoreTemperature" msprop:Generator_UserColumnName="StoreTemperature" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnStoreTemperature" msprop:Generator_ColumnPropNameInTable="StoreTemperatureColumn" msprop:Generator_ColumnPropNameInRow="StoreTemperature" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BeforeOverdue" msprop:Generator_UserColumnName="BeforeOverdue" msprop:Generator_ColumnPropNameInRow="BeforeOverdue" msprop:Generator_ColumnVarNameInTable="columnBeforeOverdue" msprop:Generator_ColumnPropNameInTable="BeforeOverdueColumn" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="NoRecipe" msprop:Generator_UserColumnName="NoRecipe" msprop:Generator_ColumnPropNameInRow="NoRecipe" msprop:Generator_ColumnVarNameInTable="columnNoRecipe" msprop:Generator_ColumnPropNameInTable="NoRecipeColumn" type="xs:boolean" minOccurs="0" />
              <xs:element name="ReferentPrice" msprop:Generator_UserColumnName="ReferentPrice" msprop:Generator_ColumnPropNameInRow="ReferentPrice" msprop:Generator_ColumnVarNameInTable="columnReferentPrice" msprop:Generator_ColumnPropNameInTable="ReferentPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReferentDate" msprop:Generator_UserColumnName="ReferentDate" msprop:Generator_ColumnPropNameInRow="ReferentDate" msprop:Generator_ColumnVarNameInTable="columnReferentDate" msprop:Generator_ColumnPropNameInTable="ReferentDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Original_MD" msprop:Generator_UserColumnName="Original_MD" msprop:Generator_ColumnPropNameInRow="Original_MD" msprop:Generator_ColumnVarNameInTable="columnOriginal_MD" msprop:Generator_ColumnPropNameInTable="Original_MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CatalogName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="CatalogName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCatalogName" msprop:Generator_ColumnPropNameInTable="CatalogNameColumn" msprop:Generator_ColumnPropNameInRow="CatalogName" type="xs:string" minOccurs="0" />
              <xs:element name="MedFormName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="MedFormName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMedFormName" msprop:Generator_ColumnPropNameInTable="MedFormNameColumn" msprop:Generator_ColumnPropNameInRow="MedFormName" type="xs:string" minOccurs="0" />
              <xs:element name="AssessmentGroupName" msprop:Generator_UserColumnName="AssessmentGroupName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AssessmentGroupName" msprop:Generator_ColumnPropNameInTable="AssessmentGroupNameColumn" msprop:Generator_ColumnVarNameInTable="columnAssessmentGroupName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ToDelete" msprop:Generator_UserColumnName="ToDelete" msprop:Generator_ColumnVarNameInTable="columnToDelete" msprop:Generator_ColumnPropNameInRow="ToDelete" msprop:Generator_ColumnPropNameInTable="ToDeleteColumn" type="xs:boolean" default="false" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Departments" msprop:Generator_UserTableName="Departments" msprop:Generator_RowDeletedName="DepartmentsRowDeleted" msprop:Generator_RowChangedName="DepartmentsRowChanged" msprop:Generator_RowClassName="DepartmentsRow" msprop:Generator_RowChangingName="DepartmentsRowChanging" msprop:Generator_RowEvArgName="DepartmentsRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentsRowChangeEventHandler" msprop:Generator_TableClassName="DepartmentsDataTable" msprop:Generator_TableVarName="tableDepartments" msprop:Generator_RowDeletingName="DepartmentsRowDeleting" msprop:Generator_TablePropName="Departments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShortName" msprop:Generator_UserColumnName="ShortName" msprop:Generator_ColumnPropNameInRow="ShortName" msprop:Generator_ColumnVarNameInTable="columnShortName" msprop:Generator_ColumnPropNameInTable="ShortNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Parties" msprop:Generator_UserTableName="Parties" msprop:Generator_RowDeletedName="PartiesRowDeleted" msprop:Generator_RowChangedName="PartiesRowChanged" msprop:Generator_RowClassName="PartiesRow" msprop:Generator_RowChangingName="PartiesRowChanging" msprop:Generator_RowEvArgName="PartiesRowChangeEvent" msprop:Generator_RowEvHandlerName="PartiesRowChangeEventHandler" msprop:Generator_TableClassName="PartiesDataTable" msprop:Generator_TableVarName="tableParties" msprop:Generator_RowDeletingName="PartiesRowDeleting" msprop:Generator_TablePropName="Parties">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" msprop:Generator_ColumnVarNameInTable="columnCountryName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="Barcode" msprop:Generator_UserColumnName="Barcode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Barcode" msprop:Generator_ColumnPropNameInTable="BarcodeColumn" msprop:Generator_ColumnVarNameInTable="columnBarcode">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Expiration" msprop:Generator_UserColumnName="Expiration" msprop:Generator_ColumnVarNameInTable="columnExpiration" msprop:Generator_ColumnPropNameInRow="Expiration" msprop:Generator_ColumnPropNameInTable="ExpirationColumn" type="xs:boolean" minOccurs="0" />
              <xs:element name="SupplierDocId" msprop:Generator_UserColumnName="SupplierDocId" msprop:Generator_ColumnVarNameInTable="columnSupplierDocId" msprop:Generator_ColumnPropNameInRow="SupplierDocId" msprop:Generator_ColumnPropNameInTable="SupplierDocIdColumn" type="xs:int" />
              <xs:element name="AllowUnPack" msprop:Generator_UserColumnName="AllowUnPack" msprop:Generator_ColumnPropNameInRow="AllowUnPack" msprop:Generator_ColumnVarNameInTable="columnAllowUnPack" msprop:Generator_ColumnPropNameInTable="AllowUnPackColumn" type="xs:boolean" />
              <xs:element name="RetailPack" msprop:Generator_UserColumnName="RetailPack" msprop:Generator_ColumnPropNameInRow="RetailPack" msprop:Generator_ColumnVarNameInTable="columnRetailPack" msprop:Generator_ColumnPropNameInTable="RetailPackColumn" type="xs:int" />
              <xs:element name="ChildGoodsId" msprop:Generator_UserColumnName="ChildGoodsId" msprop:Generator_ColumnPropNameInRow="ChildGoodsId" msprop:Generator_ColumnVarNameInTable="columnChildGoodsId" msprop:Generator_ColumnPropNameInTable="ChildGoodsIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="RepriceWriteoffReason" msprop:Generator_UserTableName="RepriceWriteoffReason" msprop:Generator_RowDeletedName="RepriceWriteoffReasonRowDeleted" msprop:Generator_RowChangedName="RepriceWriteoffReasonRowChanged" msprop:Generator_RowClassName="RepriceWriteoffReasonRow" msprop:Generator_RowChangingName="RepriceWriteoffReasonRowChanging" msprop:Generator_RowEvArgName="RepriceWriteoffReasonRowChangeEvent" msprop:Generator_RowEvHandlerName="RepriceWriteoffReasonRowChangeEventHandler" msprop:Generator_TableClassName="RepriceWriteoffReasonDataTable" msprop:Generator_TableVarName="tableRepriceWriteoffReason" msprop:Generator_RowDeletingName="RepriceWriteoffReasonRowDeleting" msprop:Generator_TablePropName="RepriceWriteoffReason">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="vwGoodsDetailed" msprop:Generator_UserTableName="vwGoodsDetailed" msprop:Generator_RowDeletedName="vwGoodsDetailedRowDeleted" msprop:Generator_RowChangedName="vwGoodsDetailedRowChanged" msprop:Generator_RowClassName="vwGoodsDetailedRow" msprop:Generator_RowChangingName="vwGoodsDetailedRowChanging" msprop:Generator_RowEvArgName="vwGoodsDetailedRowChangeEvent" msprop:Generator_RowEvHandlerName="vwGoodsDetailedRowChangeEventHandler" msprop:Generator_TableClassName="vwGoodsDetailedDataTable" msprop:Generator_TableVarName="tablevwGoodsDetailed" msprop:Generator_RowDeletingName="vwGoodsDetailedRowDeleting" msprop:Generator_TablePropName="vwGoodsDetailed">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AssortmentSmall" msprop:Generator_UserTableName="AssortmentSmall" msprop:Generator_RowDeletedName="AssortmentSmallRowDeleted" msprop:Generator_RowChangedName="AssortmentSmallRowChanged" msprop:Generator_RowClassName="AssortmentSmallRow" msprop:Generator_RowChangingName="AssortmentSmallRowChanging" msprop:Generator_RowEvArgName="AssortmentSmallRowChangeEvent" msprop:Generator_RowEvHandlerName="AssortmentSmallRowChangeEventHandler" msprop:Generator_TableClassName="AssortmentSmallDataTable" msprop:Generator_TableVarName="tableAssortmentSmall" msprop:Generator_RowDeletingName="AssortmentSmallRowDeleting" msprop:Generator_TablePropName="AssortmentSmall">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="LastGods" msprop:Generator_UserTableName="LastGods" msprop:Generator_RowDeletedName="LastGodsRowDeleted" msprop:Generator_RowChangedName="LastGodsRowChanged" msprop:Generator_RowClassName="LastGodsRow" msprop:Generator_RowChangingName="LastGodsRowChanging" msprop:Generator_RowEvArgName="LastGodsRowChangeEvent" msprop:Generator_RowEvHandlerName="LastGodsRowChangeEventHandler" msprop:Generator_TableClassName="LastGodsDataTable" msprop:Generator_TableVarName="tableLastGods" msprop:Generator_RowDeletingName="LastGodsRowDeleting" msprop:Generator_TablePropName="LastGods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="AssortmentId" msprop:Generator_UserColumnName="AssortmentId" msprop:Generator_ColumnVarNameInTable="columnAssortmentId" msprop:Generator_ColumnPropNameInRow="AssortmentId" msprop:Generator_ColumnPropNameInTable="AssortmentIdColumn" type="xs:int" />
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" />
              <xs:element name="CountryId" msprop:Generator_UserColumnName="CountryId" msprop:Generator_ColumnVarNameInTable="columnCountryId" msprop:Generator_ColumnPropNameInRow="CountryId" msprop:Generator_ColumnPropNameInTable="CountryIdColumn" type="xs:int" />
              <xs:element name="WholesalePack" msprop:Generator_UserColumnName="WholesalePack" msprop:Generator_ColumnVarNameInTable="columnWholesalePack" msprop:Generator_ColumnPropNameInRow="WholesalePack" msprop:Generator_ColumnPropNameInTable="WholesalePackColumn" type="xs:int" />
              <xs:element name="RetailPack" msprop:Generator_UserColumnName="RetailPack" msprop:Generator_ColumnVarNameInTable="columnRetailPack" msprop:Generator_ColumnPropNameInRow="RetailPack" msprop:Generator_ColumnPropNameInTable="RetailPackColumn" type="xs:int" />
              <xs:element name="AllowUnPack" msprop:Generator_UserColumnName="AllowUnPack" msprop:Generator_ColumnVarNameInTable="columnAllowUnPack" msprop:Generator_ColumnPropNameInRow="AllowUnPack" msprop:Generator_ColumnPropNameInTable="AllowUnPackColumn" type="xs:boolean" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInRow="CountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufactureName" msprop:Generator_UserColumnName="ManufactureName" msprop:Generator_ColumnVarNameInTable="columnManufactureName" msprop:Generator_ColumnPropNameInRow="ManufactureName" msprop:Generator_ColumnPropNameInTable="ManufactureNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ChildName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="ChildName" msprop:Generator_ColumnPropNameInRow="ChildName" msprop:Generator_ColumnVarNameInTable="columnChildName" msprop:Generator_ColumnPropNameInTable="ChildNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Link" msprop:Generator_UserTableName="Link" msprop:Generator_RowDeletedName="LinkRowDeleted" msprop:Generator_RowChangedName="LinkRowChanged" msprop:Generator_RowClassName="LinkRow" msprop:Generator_RowChangingName="LinkRowChanging" msprop:Generator_RowEvArgName="LinkRowChangeEvent" msprop:Generator_RowEvHandlerName="LinkRowChangeEventHandler" msprop:Generator_TableClassName="LinkDataTable" msprop:Generator_TableVarName="tableLink" msprop:Generator_RowDeletingName="LinkRowDeleting" msprop:Generator_TablePropName="Link">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="innerId" msprop:Generator_UserColumnName="innerId" msprop:Generator_ColumnPropNameInRow="innerId" msprop:Generator_ColumnVarNameInTable="columninnerId" msprop:Generator_ColumnPropNameInTable="innerIdColumn" type="xs:int" />
              <xs:element name="innerName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="innerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columninnerName" msprop:Generator_ColumnPropNameInTable="innerNameColumn" msprop:Generator_ColumnPropNameInRow="innerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="innerManufacturer" msprop:Generator_UserColumnName="innerManufacturer" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columninnerManufacturer" msprop:Generator_ColumnPropNameInTable="innerManufacturerColumn" msprop:Generator_ColumnPropNameInRow="innerManufacturer" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="innerCountry" msprop:Generator_UserColumnName="innerCountry" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columninnerCountry" msprop:Generator_ColumnPropNameInTable="innerCountryColumn" msprop:Generator_ColumnPropNameInRow="innerCountry" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="linkId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="linkId" msprop:Generator_ColumnPropNameInRow="linkId" msprop:Generator_ColumnVarNameInTable="columnlinkId" msprop:Generator_ColumnPropNameInTable="linkIdColumn" type="xs:int" />
              <xs:element name="outerName" msprop:Generator_UserColumnName="outerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnouterName" msprop:Generator_ColumnPropNameInTable="outerNameColumn" msprop:Generator_ColumnPropNameInRow="outerName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerCountry" msprop:Generator_UserColumnName="outerCountry" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnouterCountry" msprop:Generator_ColumnPropNameInTable="outerCountryColumn" msprop:Generator_ColumnPropNameInRow="outerCountry" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerManufacturer" msprop:Generator_UserColumnName="outerManufacturer" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnouterManufacturer" msprop:Generator_ColumnPropNameInTable="outerManufacturerColumn" msprop:Generator_ColumnPropNameInRow="outerManufacturer" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="70" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerId" msprop:Generator_UserColumnName="outerId" msprop:Generator_ColumnPropNameInRow="outerId" msprop:Generator_ColumnVarNameInTable="columnouterId" msprop:Generator_ColumnPropNameInTable="outerIdColumn" type="xs:int" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DepartmentUsers" msprop:Generator_UserTableName="DepartmentUsers" msprop:Generator_RowDeletedName="DepartmentUsersRowDeleted" msprop:Generator_RowChangedName="DepartmentUsersRowChanged" msprop:Generator_RowClassName="DepartmentUsersRow" msprop:Generator_RowChangingName="DepartmentUsersRowChanging" msprop:Generator_RowEvArgName="DepartmentUsersRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentUsersRowChangeEventHandler" msprop:Generator_TableClassName="DepartmentUsersDataTable" msprop:Generator_TableVarName="tableDepartmentUsers" msprop:Generator_RowDeletingName="DepartmentUsersRowDeleting" msprop:Generator_TablePropName="DepartmentUsers">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:Caption="Идентификатор" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Login" msdata:Caption="Логин" msprop:Generator_UserColumnName="Login" msprop:Generator_ColumnVarNameInTable="columnLogin" msprop:Generator_ColumnPropNameInRow="Login" msprop:Generator_ColumnPropNameInTable="LoginColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FirstName" msdata:Caption="Имя пользователя" msprop:Generator_UserColumnName="FirstName" msprop:Generator_ColumnVarNameInTable="columnFirstName" msprop:Generator_ColumnPropNameInRow="FirstName" msprop:Generator_ColumnPropNameInTable="FirstNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SecondName" msdata:Caption="Отчество" msprop:Generator_UserColumnName="SecondName" msprop:Generator_ColumnVarNameInTable="columnSecondName" msprop:Generator_ColumnPropNameInRow="SecondName" msprop:Generator_ColumnPropNameInTable="SecondNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LastName" msdata:Caption="Фамилия" msprop:Generator_UserColumnName="LastName" msprop:Generator_ColumnVarNameInTable="columnLastName" msprop:Generator_ColumnPropNameInRow="LastName" msprop:Generator_ColumnPropNameInTable="LastNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msdata:Caption="Описание" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msdata:Caption="Дата изменения" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msdata:Caption="Кто изменил" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentId" msdata:ReadOnly="true" msdata:Caption="Идентификатор департамента" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Link1" msprop:Generator_UserTableName="Link1" msprop:Generator_RowDeletedName="Link1RowDeleted" msprop:Generator_RowChangedName="Link1RowChanged" msprop:Generator_RowClassName="Link1Row" msprop:Generator_RowChangingName="Link1RowChanging" msprop:Generator_RowEvArgName="Link1RowChangeEvent" msprop:Generator_RowEvHandlerName="Link1RowChangeEventHandler" msprop:Generator_TableClassName="Link1DataTable" msprop:Generator_TableVarName="tableLink1" msprop:Generator_RowDeletingName="Link1RowDeleting" msprop:Generator_TablePropName="Link1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="innerId" msprop:Generator_UserColumnName="innerId" msprop:Generator_ColumnVarNameInTable="columninnerId" msprop:Generator_ColumnPropNameInRow="innerId" msprop:Generator_ColumnPropNameInTable="innerIdColumn" type="xs:int" />
              <xs:element name="innerName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="innerName" msprop:Generator_ColumnVarNameInTable="columninnerName" msprop:Generator_ColumnPropNameInRow="innerName" msprop:Generator_ColumnPropNameInTable="innerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="innerManufacturer" msprop:Generator_UserColumnName="innerManufacturer" msprop:Generator_ColumnVarNameInTable="columninnerManufacturer" msprop:Generator_ColumnPropNameInRow="innerManufacturer" msprop:Generator_ColumnPropNameInTable="innerManufacturerColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="innerCountry" msprop:Generator_UserColumnName="innerCountry" msprop:Generator_ColumnVarNameInTable="columninnerCountry" msprop:Generator_ColumnPropNameInRow="innerCountry" msprop:Generator_ColumnPropNameInTable="innerCountryColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="linkId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="linkId" msprop:Generator_ColumnVarNameInTable="columnlinkId" msprop:Generator_ColumnPropNameInRow="linkId" msprop:Generator_ColumnPropNameInTable="linkIdColumn" type="xs:int" />
              <xs:element name="outerName" msprop:Generator_UserColumnName="outerName" msprop:Generator_ColumnVarNameInTable="columnouterName" msprop:Generator_ColumnPropNameInRow="outerName" msprop:Generator_ColumnPropNameInTable="outerNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerCountry" msprop:Generator_UserColumnName="outerCountry" msprop:Generator_ColumnVarNameInTable="columnouterCountry" msprop:Generator_ColumnPropNameInRow="outerCountry" msprop:Generator_ColumnPropNameInTable="outerCountryColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerManufacturer" msprop:Generator_UserColumnName="outerManufacturer" msprop:Generator_ColumnVarNameInTable="columnouterManufacturer" msprop:Generator_ColumnPropNameInRow="outerManufacturer" msprop:Generator_ColumnPropNameInTable="outerManufacturerColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="70" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="outerId" msprop:Generator_UserColumnName="outerId" msprop:Generator_ColumnVarNameInTable="columnouterId" msprop:Generator_ColumnPropNameInRow="outerId" msprop:Generator_ColumnPropNameInTable="outerIdColumn" type="xs:int" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AggregatedGoods" msprop:Generator_UserTableName="AggregatedGoods" msprop:Generator_RowDeletedName="AggregatedGoodsRowDeleted" msprop:Generator_RowChangedName="AggregatedGoodsRowChanged" msprop:Generator_RowClassName="AggregatedGoodsRow" msprop:Generator_RowChangingName="AggregatedGoodsRowChanging" msprop:Generator_RowEvArgName="AggregatedGoodsRowChangeEvent" msprop:Generator_RowEvHandlerName="AggregatedGoodsRowChangeEventHandler" msprop:Generator_TableClassName="AggregatedGoodsDataTable" msprop:Generator_TableVarName="tableAggregatedGoods" msprop:Generator_RowDeletingName="AggregatedGoodsRowDeleting" msprop:Generator_TablePropName="AggregatedGoods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Catalog" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Countries_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Countries" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="MedForm_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:MedForm" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Contragents_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Contragents" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Manufacturers_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Manufacturers" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Goods_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Goods" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="AssessmentGroup_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:AssessmentGroup" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Assortment_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Assortment" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Departments_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Departments" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Parties_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Parties" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="RepriceWriteoffReason_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:RepriceWriteoffReason" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="vwGoodsDetailed_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:vwGoodsDetailed" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="AssortmentSmall_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:AssortmentSmall" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Link_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Link" />
      <xs:field xpath="mstns:linkId" />
    </xs:unique>
    <xs:unique name="DepartmentUsers_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:DepartmentUsers" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Link1_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Link1" />
      <xs:field xpath="mstns:linkId" />
    </xs:unique>
  </xs:element>
  <xs:annotation>
    <xs:appinfo>
      <msdata:Relationship name="FK_Manufacturers_Countries" msdata:parent="Countries" msdata:child="Manufacturers" msdata:parentkey="Id" msdata:childkey="CountryId" msprop:Generator_UserRelationName="FK_Manufacturers_Countries" msprop:Generator_RelationVarName="relationFK_Manufacturers_Countries" msprop:Generator_UserChildTable="Manufacturers" msprop:Generator_UserParentTable="Countries" msprop:Generator_ParentPropName="CountriesRow" msprop:Generator_ChildPropName="GetManufacturersRows" />
      <msdata:Relationship name="FK_Goods_Countries" msdata:parent="Countries" msdata:child="Goods" msdata:parentkey="Id" msdata:childkey="CountryId" msprop:Generator_UserRelationName="FK_Goods_Countries" msprop:Generator_RelationVarName="relationFK_Goods_Countries" msprop:Generator_UserChildTable="Goods" msprop:Generator_UserParentTable="Countries" msprop:Generator_ParentPropName="CountriesRow" msprop:Generator_ChildPropName="GetGoodsRows" />
      <msdata:Relationship name="FK_Goods_Manufacturers" msdata:parent="Manufacturers" msdata:child="Goods" msdata:parentkey="Id" msdata:childkey="ManufacturerId" msprop:Generator_UserRelationName="FK_Goods_Manufacturers" msprop:Generator_RelationVarName="relationFK_Goods_Manufacturers" msprop:Generator_UserChildTable="Goods" msprop:Generator_UserParentTable="Manufacturers" msprop:Generator_ParentPropName="ManufacturersRow" msprop:Generator_ChildPropName="GetGoodsRows" />
      <msdata:Relationship name="FK_Goods_Assortment" msdata:parent="Assortment" msdata:child="Goods" msdata:parentkey="Id" msdata:childkey="AssortmentId" msprop:Generator_UserRelationName="FK_Goods_Assortment" msprop:Generator_RelationVarName="relationFK_Goods_Assortment" msprop:Generator_UserChildTable="Goods" msprop:Generator_UserParentTable="Assortment" msprop:Generator_ParentPropName="AssortmentRow" msprop:Generator_ChildPropName="GetGoodsRows" />
      <msdata:Relationship name="FK_Assortment_MedForm" msdata:parent="MedForm" msdata:child="Assortment" msdata:parentkey="Id" msdata:childkey="MedFormId" msprop:Generator_UserRelationName="FK_Assortment_MedForm" msprop:Generator_RelationVarName="relationFK_Assortment_MedForm" msprop:Generator_UserChildTable="Assortment" msprop:Generator_UserParentTable="MedForm" msprop:Generator_ParentPropName="MedFormRow" msprop:Generator_ChildPropName="GetAssortmentRows" />
      <msdata:Relationship name="FK_Assortment_AssessmentGroup" msdata:parent="AssessmentGroup" msdata:child="Assortment" msdata:parentkey="Id" msdata:childkey="AssesmentGroupId" msprop:Generator_UserRelationName="FK_Assortment_AssessmentGroup" msprop:Generator_RelationVarName="relationFK_Assortment_AssessmentGroup" msprop:Generator_UserChildTable="Assortment" msprop:Generator_UserParentTable="AssessmentGroup" msprop:Generator_ParentPropName="AssessmentGroupRow" msprop:Generator_ChildPropName="GetAssortmentRows" />
      <msdata:Relationship name="FK_Goods_Manufacturers1" msdata:parent="Manufacturers" msdata:child="Parties" msdata:parentkey="Id" msdata:childkey="ManufacturerId" msprop:Generator_UserRelationName="FK_Goods_Manufacturers1" msprop:Generator_RelationVarName="relationFK_Goods_Manufacturers1" msprop:Generator_UserChildTable="Parties" msprop:Generator_UserParentTable="Manufacturers" msprop:Generator_ParentPropName="ManufacturersRow" msprop:Generator_ChildPropName="GetPartiesRows" />
      <msdata:Relationship name="FK_Catalog_Catalog" msdata:parent="Catalog" msdata:child="Catalog" msdata:parentkey="Id" msdata:childkey="ParentId" msprop:Generator_UserRelationName="FK_Catalog_Catalog" msprop:Generator_RelationVarName="relationFK_Catalog_Catalog" msprop:Generator_UserChildTable="Catalog" msprop:Generator_UserParentTable="Catalog" msprop:Generator_ParentPropName="CatalogRowParent" msprop:Generator_ChildPropName="GetCatalogRows" />
    </xs:appinfo>
  </xs:annotation>
</xs:schema>